<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="conditional-rendering">
        <button @click='funcSeeMe'>点我</button>
        <p v-if='seen'>现在你看到我了！</p>
        <p v-else>现在你看到我了2！</p>
        <p v-show='seen'>现在你看到我了3！</p>
    </div>

    <script>
        const ConditionalRendering={
            data() {
                return {
                    seen:true
                }
            },
            methods: {
                funcSeeMe(){
                    this.seen = !this.seen
                }
            },
        }

        const app = Vue.createApp(ConditionalRendering)
        app.mount('#conditional-rendering')
    </script>
</body>
</html>